package com.haopeng.consumer.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.haopeng.common.exception.CommonException;
import com.haopeng.producer.api.HelloApi;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Api(tags= {"消费端demo"})
@RestController
public class ConsumerController {

	@Autowired
	HelloApi helloApi;
	
	@ApiOperation(value="hello测试")
	@GetMapping("/say")
	public String sayHello(String name) {
		return helloApi.say()+" "+name;
	}
}
